package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the REG_PREDIOS database table.
 * 
 */
@Entity
@Table(name="REG_PREDIOS")
public class RegPredio implements Serializable {
	private static final long serialVersionUID = 1L;
	private RegPredioPK id;
	private String agntSync;
	private String estado;
	private String noVia;
	private String noZona;
	private String nuInmb;
	private String numInter;
	private Date tsUltSync;
	private TmDistrito tmDistrito;
	private TipoVia tipoViaBean;
	private TipoInterior tipoInterior;
	private TipoNumeracion tipoNumeracion;
	private TipoZona tipoZonaBean;
	private Partida partida;

    public RegPredio() {
    }


	@EmbeddedId
	public RegPredioPK getId() {
		return this.id;
	}

	public void setId(RegPredioPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(length=1)
	public String getEstado() {
		return this.estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}


	@Column(name="NO_VIA", length=100)
	public String getNoVia() {
		return this.noVia;
	}

	public void setNoVia(String noVia) {
		this.noVia = noVia;
	}


	@Column(name="NO_ZONA", nullable=false, length=100)
	public String getNoZona() {
		return this.noZona;
	}

	public void setNoZona(String noZona) {
		this.noZona = noZona;
	}


	@Column(name="NU_INMB", nullable=false, length=100)
	public String getNuInmb() {
		return this.nuInmb;
	}

	public void setNuInmb(String nuInmb) {
		this.nuInmb = nuInmb;
	}


	@Column(name="NUM_INTER", length=100)
	public String getNumInter() {
		return this.numInter;
	}

	public void setNumInter(String numInter) {
		this.numInter = numInter;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to TmDistrito
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="DIST_ID", referencedColumnName="DIST_ID", nullable=false),
		@JoinColumn(name="DPTO_ID", referencedColumnName="DPTO_ID", nullable=false),
		@JoinColumn(name="PAIS_ID", referencedColumnName="PAIS_ID", nullable=false),
		@JoinColumn(name="PROV_ID", referencedColumnName="PROV_ID", nullable=false)
		})
	public TmDistrito getTmDistrito() {
		return this.tmDistrito;
	}

	public void setTmDistrito(TmDistrito tmDistrito) {
		this.tmDistrito = tmDistrito;
	}
	

	//bi-directional many-to-one association to TipoVia
    @ManyToOne
	@JoinColumn(name="TIPO_VIA", nullable=false)
	public TipoVia getTipoViaBean() {
		return this.tipoViaBean;
	}

	public void setTipoViaBean(TipoVia tipoViaBean) {
		this.tipoViaBean = tipoViaBean;
	}
	

	//bi-directional many-to-one association to TipoInterior
    @ManyToOne
	@JoinColumn(name="TIPO_INTER", nullable=false)
	public TipoInterior getTipoInterior() {
		return this.tipoInterior;
	}

	public void setTipoInterior(TipoInterior tipoInterior) {
		this.tipoInterior = tipoInterior;
	}
	

	//bi-directional many-to-one association to TipoNumeracion
    @ManyToOne
	@JoinColumn(name="TIPO_NUMER", nullable=false)
	public TipoNumeracion getTipoNumeracion() {
		return this.tipoNumeracion;
	}

	public void setTipoNumeracion(TipoNumeracion tipoNumeracion) {
		this.tipoNumeracion = tipoNumeracion;
	}
	

	//bi-directional many-to-one association to TipoZona
    @ManyToOne
	@JoinColumn(name="TIPO_ZONA", nullable=false)
	public TipoZona getTipoZonaBean() {
		return this.tipoZonaBean;
	}

	public void setTipoZonaBean(TipoZona tipoZonaBean) {
		this.tipoZonaBean = tipoZonaBean;
	}
	

	//bi-directional many-to-one association to Partida
    @ManyToOne
	@JoinColumn(name="REFNUM_PART", nullable=false, insertable=false, updatable=false)
	public Partida getPartida() {
		return this.partida;
	}

	public void setPartida(Partida partida) {
		this.partida = partida;
	}
	
}